<?php include('header.php');?>
<div style="display:none;">b0f27bad616434872286b63c7d2d2278</div>
<!-- body begin -->
<div class="blank5"></div>
<div class="body_content">

    <!--首页通栏广告开始-->
	<div class="banner"><img src="<?=config_item('i_base_url');?>images/banner.jpg" alt="首页通栏广告开始" width="966" height="92"></div>
    <!--首页通栏广告结束-->
	<div class="blank5"></div>

    <!--电影开始-->
	<div class="r1_left">
		<div class="r1_left_title">
			<span><h4>最新电影下载</h4></span>
			<a href="<?=config_item('i_base_url');?>category/1/0/1.html">更多»</a><hr>
		</div>
		<ul class="r1_left_content smallclean">
			<!--foreac id=li_cur为标红-->
            <?php foreach ($movie as $k => $v) :?>
			<li>
				<span class="l_s_j" <?=($k < 3) ? 'id="li_cur"' : '';?>>
                    <?php $type = trim($v['type']);
                    $t = (empty ($type) || ( strpos($type, '|') === false ) ) ? array(0 => $type) : explode('|', $type);
                    echo empty ($t[0]) ? '动作' : $t[0];?>
                </span>
				<span style="width:350px;height:30px;overflow:hidden;display:block;" class="left" <?=($k < 3) ? 'id="li_cur"' : '';?>>
                    <a href="<?=movie_url($v['id'])?>" target="_blank" title="<?=$v['china_name']?>">
                        <?=getViewName($v['starring'], $v['public_time'], $v['update_status'], $v['type'], $v['china_name'], $v['version'], $v['language']);?>
                    </a>
                </span>
				<span class="right" <?=($k < 3) ? 'id="li_cur"' : '';?>><?=date('Y-m-d', strtotime($v['update_time']))?></span>
            </li>
            <?php endforeach;?>
			<!--foreach end-->
		</ul>
	</div>
	<div class="r1_right">
		<div class="r1_right_nav">
			<a href="javascript:void(0);" id="r1_r_nav_cur" onmousemove="dy.selectRecommend(this, 1)"><h4>电&nbsp;&nbsp;影</h4></a>
			<a href="javascript:void(0);" onmousemove="dy.selectRecommend(this, 2)"><h4>剧集</h4></a>
			<a href="javascript:void(0);" onmousemove="dy.selectRecommend(this, 3)"><h4>综艺</h4></a>
			<a href="javascript:void(0);" onmousemove="dy.selectRecommend(this, 4)"><h4>动漫</h4></a>
			<a href="javascript:void(0);" onmousemove="dy.selectRecommend(this, 5)" style="width:80px; _width:78px; border-right:0;"><h4>音乐</h4></a>
		</div>
        <!-- 电影开始 -->
		<div class="r1_right_c" id="recommend_list1">
			<ul>
                <?php $recommendMovie = $movie;shuffle($recommendMovie); foreach ($recommendMovie as $k => $v) :?>
                <?php if ($k > 3) break;?>
				<li class="has_bottom">
					<div><a target="_blank" href="<?=movie_url($v['id'])?>" title="<?=$v['china_name']?>">
						<p><img src="<?=image_url($v['id']);?>" width="160" height="224" alt="<?=$v['china_name']?>" onerror="dy.nopic(this)"></p>
						<p class="r1_r_word"><?=$v['china_name'];?></p>
					</a></div>
				</li>
                <?php endforeach;?>
			</ul>
		</div>
        <!-- 电影结束 -->

        <!-- 剧集开始 -->
        <div class="r1_right_c" style="display: none;" id="recommend_list2">
            <ul>
                  <?php $recommendTv = $tv;shuffle($recommendTv); foreach ($recommendTv as $k => $v) :?>
                  <?php if ($k > 3) break;?>
                <li class="has_bottom">
                    <div><a target="_blank" href="<?=movie_url($v['id'])?>" title="<?=$v['china_name']?>">
                        <p><img src="<?=image_url($v['id']);?>" width="160" height="224" alt="<?=$v['china_name']?>" onerror="dy.nopic(this)"></p>
                        <p class="r1_r_word"><?=$v['china_name'];?></p>
                    </a></div>
                </li>
                  <?php endforeach;?>
            </ul>
        </div>
        <!-- 剧集结束 -->

        <!-- 综艺开始 -->
        <div class="r1_right_c" style="display: none;" id="recommend_list3">
            <ul>
                  <?php $recommendVareity = $vareity; shuffle($recommendVareity); foreach ($recommendVareity as $k => $v) :?>
                  <?php if ($k > 3) break;?>
                <li class="has_bottom">
                    <div><a target="_blank" href="<?=movie_url($v['id'])?>" title="<?=$v['china_name']?>">
                        <p><img src="<?=image_url($v['id']);?>" width="160" height="224" alt="<?=$v['china_name']?>" onerror="dy.nopic(this)"></p>
                        <p class="r1_r_word"><?=$v['china_name'];?></p>
                    </a></div>
                </li>
                  <?php endforeach;?>
            </ul>
        </div>
        <!-- 综艺结束 -->

        <!-- 动漫开始 -->
        <div class="r1_right_c" style="display: none;" id="recommend_list4">
            <ul>
                  <?php $recommendAnima = $anima;shuffle($recommendAnima); foreach ($recommendAnima as $k => $v) :?>
                  <?php if ($k > 3) break;?>
                <li class="has_bottom">
                    <div><a target="_blank" href="<?=movie_url($v['id'])?>" title="<?=$v['china_name']?>">
                        <p><img src="<?=image_url($v['id']);?>" width="160" height="224" alt="<?=$v['china_name']?>" onerror="dy.nopic(this)"></p>
                        <p class="r1_r_word"><?=$v['china_name'];?></p>
                    </a></div>
                </li>
                  <?php endforeach;?>
            </ul>
        </div>
        <!-- 动漫结束 -->

        <!-- 音乐开始 -->
        <div class="r1_right_c" style="display: none;" id="recommend_list5">
            <ul>
                  <?php $recommendMusic = $music; shuffle($recommendMusic); foreach ($recommendMusic as $k => $v) :?>
                  <?php if ($k > 3) break;?>
                <li class="has_bottom">
                    <div><a target="_blank" href="<?=movie_url($v['id'])?>" title="<?=$v['china_name']?>">
                        <p><img src="<?=image_url($v['id']);?>" width="160" height="224" alt="<?=$v['china_name']?>" onerror="dy.nopic(this)"></p>
                        <p class="r1_r_word"><?=$v['china_name'];?></p>
                    </a></div>
                </li>
                  <?php endforeach;?>
            </ul>
        </div>
        <!-- 音乐结束 -->
	</div>
    <!--电影结束-->

    <div class="clear"></div> <div class="blank5"></div>


    <!--高清电影开始-->
	<div class="r2">
        <div style="width: 715px;border-right: 1px solid #d4d4d4;float: left">
		<span class="r2_title"><h4>高清推荐电影</h4></span>
		<div class="r2_c">
			<div class="r2_show">
				<ul>
                    <?php shuffle($movie); foreach ($movie as $hmk => $hmv) :?>
                    <?php if ($hmk > 5) continue;?>
					<li><a target="_blank" href="<?=movie_url($hmv['id'])?>">
						<p><img src="<?=image_url($hmv['id']);?>" width="104" height="146" alt="<?=$hmv['china_name'];?>" onerror="dy.nopic(this)"/></p>
						<p class="r2_show_word"><?=$hmv['china_name'];?></p></a>
					</li>
                    <?php endforeach;?>
				</ul>
			</div>
		</div>
        </div>
        <div class="r2_ad">
						<p><img src="<?=config_item('i_base_url');?>images/pic/r2_ad.jpg" width="230" height="115" alt="广告"></p>
						<p><img src="<?=config_item('i_base_url');?>images/pic/r2_ad.jpg" width="230" height="115" alt="广告"></p>
					</div>
	</div>
    <!--高清电影结束-->


    <div class="clear"></div> <div class="blank5"></div>
    <!--电影通栏广告开始-->
	<div class="banner"><img src="<?=config_item('i_base_url');?>images/banner.jpg" alt="电影通栏广告开始" width="966" height="92"></div>
    <!--电影通栏广告结束-->

    <div class="clear"></div> <div class="blank5"></div>

    <!--电影剧开始-->
	<div class="r3">
		<div class="r3_left">
			<div class="r3_left_title">
				<span><h4>最新电视剧下载</h4></span>
				<a href="<?=config_item('i_base_url');?>category/2/0/1.html">更多»</a><hr>
			</div>
			<ul class="r3_left_content smallclean">
			<?php foreach ($tv as $k => $v):?>
			<li>
				<span class="l_s_j" <?=($k < 3) ? 'id="li_cur"' : '';?>>
                    <?php $type = trim($v['type']);
                        $t = (empty ($type) || ( strpos($type, '|') === false ) ) ? array(0 => $type) : explode('|', $type);
                        echo empty ($t[0]) ? '都市' : $t[0];?>
                </span>
				<span class="left" style="width:350px;height:30px;overflow:hidden;display:block;" <?=($k < 3) ? 'id="li_cur"' : '';?>>
                    <a href="<?=movie_url($v['id'])?>" target="_blank" title="<?=$v['china_name']?>">
                        <?=getViewName($v['starring'], $v['public_time'], $v['update_status'], $v['type'], $v['china_name'], $v['version'], $v['language']);?>
                    </a>
                </span>
				<span class="right" <?=($k < 3) ? 'id="li_cur"' : '';?>><?=date('Y-m-d', strtotime($v['update_time']))?></span>
			</li>
			<?php endforeach;?>
			</ul>
		</div>
		<div class="r3_center">
			<div>
				<span><h4>推荐电视剧</h4></span>
                <?php shuffle($tv);foreach ($tv as $k=>$v):?>
                <?php if ($k > 1) continue;?><a href="<?=movie_url($v['id'])?>" target="_blank" title="<?=$v['china_name']?>">
				<p><img src="<?=image_url($v['id']);?>" width="134" height="188" alt="<?=$v['china_name']?>" onerror="dy.nopic(this)"/></p>
				<p class="r2_show_word"><?=$v['china_name']?></p></a>
                <?php endforeach;?>
			</div>
		</div>
		<div class="r3_right">
			<div class="r3_right_t">
				<div class="r_t_bg_2"><h4>电影排行榜</h4></div>
			</div>
			<div class="r3_right_c">
				<ol>
                    <?php foreach($rank['movie'] as $k=>$v):?>
					<li><?=($k+1)?>.
                        <a href="<?=movie_url($v['id'])?>" title="<?=$v['china_name']?>" target="_blank">
                        <?=getTopName($v['china_name'], $v['version'], $v['language']);?>
                        </a>
                    </li>
                    <?php endforeach;?>
				</ol>
			</div>
		</div>
	</div>
    <!--电影剧结束-->

    <div class="clear"></div> <div class="blank5"></div>

    <!--电影剧广告开始-->
	<div class="banner"><img src="<?=config_item('i_base_url');?>images/banner.jpg" alt="电影剧广告开始" width="966" height="92"></div>
    <!--电影剧广告结束-->

	<div class="blank5"></div>

    <!--综艺开始-->
	<div class="r3">
		<div class="r3_left">
			<div class="r3_left_title">
				<span><h4>最新综艺节目下载</h4></span>
				<a href="<?=config_item('i_base_url');?>category/3/0/1.html">更多»</a><hr>
			</div>
			<ul class="r3_left_content smallclean">
			<?php foreach ($vareity as $k=>$v):?>
			<li>
				<span class="l_s_j" <?=($k < 3) ? 'id="li_cur"' : '';?>>
                    <?php $type = trim($v['type']);
                        $t = (empty ($type) || ( strpos($type, '|') === false ) ) ? array(0 => $type) : explode('|', $type);
                        echo empty ($t[0]) ? '娱乐' : $t[0];?>
                </span>
				<span style="width:300px;height:30px;overflow:hidden;display:block;" class="left" <?=($k < 3) ? 'id="li_cur"' : '';?>>
                    <a href="<?=movie_url($v['id'])?>" target="_blank" title="<?=$v['china_name']?>">
                        <?=getViewName($v['starring'], $v['public_time'], $v['update_status'], $v['type'], $v['china_name'], $v['version'], $v['language']);?>
                    </a></span>
				<span class="right" <?=($k < 3) ? 'id="li_cur"' : '';?>><?=date('Y-m-d', strtotime($v['update_time']))?></span>
			</li>
			<?php endforeach;?>
			</ul>
		</div>
		<div class="r3_center">
			<div>
				<span><h4>推荐综艺节目</h4></span>
                <?php shuffle($vareity);foreach ($vareity as $k=>$v):?>
                <?php if ($k > 1) continue;?><a href="<?=movie_url($v['id'])?>" target="_blank" title="<?=$v['china_name']?>">
				<p><img src="<?=image_url($v['id']);?>" width="134" height="188" alt="<?=$v['china_name']?>" onerror="dy.nopic(this)"/></p>
				<p class="r2_show_word"><?=$v['china_name']?></p></a>
                <?php endforeach;?>
			</div>
		</div>
		<div class="r3_right">
			<div class="r3_right_t">
				<div class="r_t_bg_2"><h4>电视剧排行榜</h4></div>
			</div>
			<div class="r3_right_c">
				<ol>
                    <?php foreach($rank['tv'] as $k=>$v):?>
					<li><?=($k+1)?>. <a href="<?=movie_url($v['id'])?>" title="<?=$v['china_name']?>" target="_blank"><?=getTopName($v['china_name'], $v['version'], $v['language']);?></a></li>
                    <?php endforeach;?>
				</ol>
			</div>
		</div>
	</div>
    <!--综艺结束-->

	<div class="blank5"></div>

    <!--综艺广告开始-->
	<div class="banner"><img src="<?=config_item('i_base_url');?>images/banner.jpg" alt="综艺广告开始" width="966" height="92"></div>
    <!--综艺广告结束-->

	<div class="blank5"></div>

    <!--动漫开始-->
	<div class="r4">
		<div class="r4_left">
			<div class="r4_l_t"><h4>最新动漫下载</h4></div><hr><div class="blank5"></div>
			<ul>
                <?php foreach ($anima as $k=>$v):?>
				<li><a href="<?=movie_url($v['id'])?>" target="_blank" title="<?=$v['china_name']?>">
					<p><img src="<?=image_url($v['id']);?>" width="124" height="174" alt="<?=$v['china_name'];?>" onerror="dy.nopic(this)"/></p>
					<p class="r2_show_word"><?=$v['china_name'];?></p></a>
				</li>
                <?php endforeach;?>
			</ul>
		</div>
		<div class="r4_right">
			<div class="r3_right_t">
				<div class="r_t_bg_2"><h4>综艺节目排行榜<h4></div>
			</div>
			<div class="r4_right_c">
				<ol>
                    <?php foreach($rank['zy'] as $k=>$v):?>
					<li><?=($k+1)?>. <a href="<?=movie_url($v['id'])?>" title="<?=$v['china_name']?>" target="_blank"><?=getTopName($v['china_name'], $v['version'], $v['language']);?></a></li>
                    <?php endforeach;?>
				</ol>
			</div>
			<div class="r4_r_ad"><img src="<?=config_item('i_base_url');?>images/pic/r4_ad.jpg" width="268" height="110" alt="广告"></div>
		</div>
	</div>
    <!--动漫结束-->

	<div class="blank5"></div>

    <!--动漫广告开始-->
	<div class="banner"><img src="<?=config_item('i_base_url');?>images/banner.jpg" alt="动漫广告开始" width="966" height="92"></div>
    <!--动漫广告结束-->

	<div class="blank5"></div>

    <!--音乐开始-->
	<div class="r4">
		<div class="r4_left">
			<div class="r4_l_t"><h4>最新音乐下载</h4></div><hr><div class="blank5"></div>
			<ul>
                <?php foreach ($music as $k=>$v):?>
				<li><a href="<?=movie_url($v['id'])?>" target="_blank" title="<?=$v['china_name'];?>">
					<p><img src="<?=image_url($v['id']);?>" width="124" height="174" alt="<?=$v['china_name'];?>" onerror="dy.nopic(this)"/></p>
					<p class="r2_show_word"><?=$v['china_name'];?></p></a>
				</li>
                <?php endforeach;?>
			</ul>
		</div>
		<div class="r4_right">
			<div class="r3_right_t">
				<div class="r_t_bg_2"><h4>动漫排行榜</h4></div>
			</div>
			<div class="r4_right_c">
				<ol>
                    <?php foreach($rank['dm'] as $k=>$v):?>
					<li><?=($k+1)?>. <a href="<?=movie_url($v['id'])?>" title="<?=$v['china_name']?>" target="_blank"><?=getTopName($v['china_name'], $v['version'], $v['language']);?></a></li>
                    <?php endforeach;?>
				</ol>
			</div>
			<div class="r4_r_ad"><img src="<?=config_item('i_base_url');?>images/pic/r4_ad.jpg" width="268" height="110" alt="广告"></div>
		</div>
	</div>
    <!--音乐结束-->

</div>
<div class="blank5"></div>
<!-- body end -->
<?php include('footer.php');?>
<script src="<?=config_item('i_base_url');?>js/jump.js?ver=0.03" type="text/javascript"></script>
<?php
function getViewName($starring, $publicTime, $updateStatus, $type, $chinaName, $version, $language)
{
    //演员
    $starring = trim($starring);
    $s = (empty ($starring) || ( strpos($starring, '|') === false ) ) ? array(0 => $starring) : explode('|', $starring);
    $starring = empty ($s[0]) ? '' : $s[0];

    //年份
    $publicTime = trim($publicTime);
    $publicTime = empty($publicTime) ? '': date('Y', strtotime($publicTime));

    //更新状态
    switch($updateStatus){
        case '1':$us = '最新';break;
        case '2':$us = '连载';break;
        case '3':$us = '完结';break;
        default: $us = '连载';
    }
    $updateStatus = $us;

    //类别
    $type = trim($type);
    $t = (empty ($type) || ( strpos($type, '|') === false ) ) ? array(0 => $type) : explode('|', $type);
    $type = empty ($t[0]) ? '动作' : $t[0];

    //名字
    $chinaName = trim($chinaName);
    $chinaName = '《'.$chinaName.'》';

    //版本
    $version = trim($version);
    $version = empty ($version) ? '': $version;

    //语言
    $language = trim($language);
    $l = (empty ($language) || ( strpos($language, '|') === false ) ) ? array(0 => $language) : explode('|', $language);
    $language = empty ($l[0]) ? '' : $l[0];

    $str = $starring.' '.$publicTime.$updateStatus.$type.$chinaName.' '.$version.' '.$language;
    return $str;
}

function getTopName ($chinaName, $version, $language)
{
    //名字
    $chinaName = trim($chinaName);

    //版本
    $version = trim($version);
    $version = empty ($version) ? '': $version;

    //语言
    $language = trim($language);
    $l = (empty ($language) || ( strpos($language, '|') === false ) ) ? array(0 => $language) : explode('|', $language);
    $language = empty ($l[0]) ? '' : $l[0];

    $str = $chinaName.' '.$version.' '.$language;
    return $str;
}
?>